<%@ Page Language="C#" MasterPageFile="~/Site.master" Title="Repeater Basic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
    <AjaxData:Repeater ID="Repeater1"  AutoCreateScriptVariable="true" runat="server">
        <HeaderTemplate>
            <h3>Supplier Information</h3>
        </HeaderTemplate>
        <ItemTemplate>
            <h4>
                {{ Eval (Company) }}
            </h4>
            <table border="0">
                <tr>
                    <td><strong>Contact:</strong> </td>
                    <td colspan="3">{{ Eval(ContactName) }}&nbsp;({{ Eval (ContactTitle) }})</td>
                </tr>
                <tr>
                    <td colspan="4">{{ Eval(Address) }}</td>
                </tr>
                <tr>
                    <td colspan="2">{{ Eval(City) }}&nbsp;{{ Eval(Region) }}&nbsp;{{ Eval(PostalCode) }}</td>
                </tr>
                <tr>
                    <td colspan="4">{{ Eval(Country) }}</td>
                </tr>
                <tr>
                    <td>
                        <strong>Phone:</strong>
                    </td>
                    <td>
                        {{ Eval(Phone) }}
                    </td>
                    <td>
                        <strong>Fax:</strong>
                    </td>
                    <td>
                        {{ Eval(Fax) }}
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <SeparatorTemplate>
            <hr />
        </SeparatorTemplate>
        
    </AjaxData:Repeater>
    
    <script type="text/javascript">

        var _repeater;
        function pageLoad(sender, e)
        {
            _repeater = Repeater1;
            DataService.GetAllSupplier(onLoadSuccess);
        }

        function onLoadSuccess(result)
        {
            _repeater.set_dataSource(result);
            _repeater.dataBind();
        }
        
    </script>
</asp:Content>